# coding=utf-8

from django.db import models

# Create your models here.


class Article(models.Model):
    title = models.CharField(max_length=100)  #博客题目
    category = models.CharField(max_length=50, blank=True)  #博客标签
    content = models.TextField(blank=True, null=True)  #博客文章正文
    create_time = models.DateTimeField(auto_now_add=True, verbose_name='发表时间')  #博客日期

    def __str__(self):
        return u'title=%s, category=%s, content=%s' % (self.title, self.category, self.content)

    class Meta:
        ordering = ['-create_time']

